package com.meng.demo1.consistenthash;

/**
 * Created with IntelliJ IDEA.
 * Description:
 *
 * @Author: menglinggang
 * @Date: 2020-07-07
 * @Time: 下午2:39
 */
public interface Router {
    /**
     * 添加服务
     * @param serverId
     * @return
     */
     boolean addServer(String serverId);

    /**
     * 删除服务
     * @param serverId
     * @return
     */
     boolean removeServer(String serverId);

    /**
     * 更具key获取路由到的服务id
     * @param key
     * @return
     */
     String routeServer(String key);
}
